<html>
<head><meta charset="utf-8"><title>RustcEncodable/RustcDecodable in prelude · edition 2021 · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/index.html">edition 2021</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html">RustcEncodable/RustcDecodable in prelude</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="246402267"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246402267" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246402267">(Jul 18 2021 at 22:23)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/issues/83160">#83160</a> deprecated these derives, but it was mentioned that they couldn't be removed from the prelude. There's no reason that can't be done in an edition — should we?</p>



<a name="246402963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246402963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246402963">(Jul 18 2021 at 22:44)</a>:</h4>
<p>I'd be for doing it someday, although if you mean doing it for this year's edition it might be a bit late. crater runs have already happened, plans have already been announced, etc. bring it up with the libs-api team, perhaps?</p>



<a name="246402980"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246402980" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246402980">(Jul 18 2021 at 22:45)</a>:</h4>
<p>and if it doesn't happen for this year then file an issue in the rust repo and tag it with "lang-team-202x-edition", which is apparently the wishlist label for editions ATM</p>



<a name="246403037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246403037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246403037">(Jul 18 2021 at 22:47)</a>:</h4>
<p>Yeah, I know it's late which is why I asked. Creating an issue for the future seems reasonable.</p>



<a name="246403184"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246403184" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246403184">(Jul 18 2021 at 22:51)</a>:</h4>
<p>It's not clear to me what we gain by removing it -- they're already deprecated and (largely) unused; the surface area in terms of syntax/name is also not really desirable/interesting. So in the spirit of keeping away from changes that don't meaningfully improve language experience (but do create extra things to think about), which IIRC is one of the principles we set out, it feels like we may not want to do this.</p>



<a name="246403555"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246403555" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246403555">(Jul 18 2021 at 23:01)</a>:</h4>
<p>for any other item I might agree, but in this particular case these items were IIRC only ever exposed to stable by accident, as a regrettable oversight of Rust 1.0. they've always been undocumented and essentially unsupported</p>



<a name="246403605"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246403605" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246403605">(Jul 18 2021 at 23:02)</a>:</h4>
<p>Sure, I mean, I don't think that really changes my perspective though -- there's still a <em>little</em> overhead, and we really should still document any such transition.</p>



<a name="246403917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246403917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246403917">(Jul 18 2021 at 23:10)</a>:</h4>
<p>I'll even go so far as to say that I wouldn't even expect the machinery that supports them to exist in the compiler forever, on any edition: <a href="https://github.com/rust-lang/rust/issues/40177">https://github.com/rust-lang/rust/issues/40177</a></p>



<a name="246403936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246403936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246403936">(Jul 18 2021 at 23:12)</a>:</h4>
<p>That's a good point. It having <em>never</em> been actually exposed in docs since 1.0 and it being effectively a compiler internal, it seems reasonable that it should be able to be removed in its entirety at some point.</p>



<a name="246403972"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246403972" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246403972">(Jul 18 2021 at 23:12)</a>:</h4>
<p>but that's a much larger and long-term proposal than removing it from the prelude, and probably better discussed elsewhere</p>



<a name="246403991"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246403991" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246403991">(Jul 18 2021 at 23:13)</a>:</h4>
<p>and yes, I think people will be reluctant to endorse it for this year, but hopefully with better discipline about curating a wishlist label we can be better organized for the next edition (e.g. I totally would've submitted <a href="https://github.com/rust-lang/rust/issues/86921">https://github.com/rust-lang/rust/issues/86921</a> if I had remembered in time)</p>



<a name="246404048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246404048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246404048">(Jul 18 2021 at 23:15)</a>:</h4>
<p>Semi off topic, but I'd prefer informal edition work were ongoing rather than pushed into the year of the edition. A 2024 edition could exist instantly for three years without issue.</p>



<a name="246404164"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246404164" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246404164">(Jul 18 2021 at 23:18)</a>:</h4>
<p>sure, and maybe that's something to think about once this edition is out the door. I think the 2018 edition was so brutal that everyone was burned out in the aftermath and nobody had the will to consider getting a head start on 2021</p>



<a name="246404168"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246404168" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246404168">(Jul 18 2021 at 23:18)</a>:</h4>
<p>Probably worth creating an IRLO thread. I'll do that later <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="246404569"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246404569" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246404569">(Jul 18 2021 at 23:30)</a>:</h4>
<p>This thread was before the deprecation, but apparently <code>Encodable</code> was previously removed entirely, so there is precedent. <a href="https://internals.rust-lang.org/t/what-is-rustc-decodable-encodable-and-why-is-it-stable/13744/2?u=jhpratt">https://internals.rust-lang.org/t/what-is-rustc-decodable-encodable-and-why-is-it-stable/13744/2?u=jhpratt</a></p>



<a name="246405802"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246405802" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246405802">(Jul 19 2021 at 00:07)</a>:</h4>
<p>It's the expectation (and I believe impl wise the case) that edition next <em>is</em> already a thing</p>



<a name="246405912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246405912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Pratt <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246405912">(Jul 19 2021 at 00:10)</a>:</h4>
<p>Yeah I just meant actually creating 2024 unstably far sooner than we did 2021. So that small things like this could be discussed and potentially land, leaving the "real" work for later.</p>



<a name="246406249"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/268952-edition%202021/topic/RustcEncodable/RustcDecodable%20in%20prelude/near/246406249" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> simulacrum <a href="https://rust-lang.github.io/zulip_archive/stream/268952-edition-2021/topic/RustcEncodable.2FRustcDecodable.20in.20prelude.html#246406249">(Jul 19 2021 at 00:20)</a>:</h4>
<p>I mean that it is essentially already created, 2021 has basically "branched" or whatever metaphor from edition next already</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>